package com.onstar.cn.vehicle.entity;

import java.io.Serializable;

/**
 * Created by 6335yz on 2016/1/15.
 */
public enum ChargingState implements Serializable {

    NOT_CHARGING("not_charging"),
    CHARGING("charging"),
    CHARGING_COMPLETE("charging_complete"),
    CHARGING_ABORTED("charging_aborted");

    private String value;

    ChargingState(String value) {
        this.value = value;
    }

    public String getStringValue() {
        return value;
    }

    public static ChargingState fromValue(String v) {
        for (ChargingState c : ChargingState.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        return null;
    }
}
